
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>paths · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="url.html" />
    
    
    <link rel="prev" href="info.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    OpenAPI 文档结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="openapi.html">
            
                <a href="openapi.html">
            
                    
                    openapi
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="info.html">
            
                <a href="info.html">
            
                    
                    info
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.1.3" data-path="paths.html">
            
                <a href="paths.html">
            
                    
                    paths
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1" data-path="url.html">
            
                <a href="url.html">
            
                    
                    /add, /del, ...
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1" data-path="method.html">
            
                <a href="method.html">
            
                    
                    get, post, ...
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1.1" data-path="parameters.html">
            
                <a href="parameters.html">
            
                    
                    parameters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.1.1.2" data-path="requestBody.html">
            
                <a href="requestBody.html">
            
                    
                    requestBody
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.1.1.3" data-path="responses.html">
            
                <a href="responses.html">
            
                    
                    responses
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1.3.1" data-path="response_code.html">
            
                <a href="response_code.html">
            
                    
                    200, 400, ...
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1.3.1.1" data-path="content.html">
            
                <a href="content.html">
            
                    
                    content
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1.3.1.1.1" data-path="media.html">
            
                <a href="media.html">
            
                    
                    text/plain
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1.1.3.1.1.1.1" data-path="schema.html">
            
                <a href="schema.html">
            
                    
                    schema
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.4" data-path="components.html">
            
                <a href="components.html">
            
                    
                    components
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../schema/">
            
                <a href="../schema/">
            
                    
                    常见的 schema 规则
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../schema/string.html">
            
                <a href="../schema/string.html">
            
                    
                    字符串
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../schema/number.html">
            
                <a href="../schema/number.html">
            
                    
                    数字
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../schema/json.html">
            
                <a href="../schema/json.html">
            
                    
                    json object
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../schema/array.html">
            
                <a href="../schema/array.html">
            
                    
                    数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../schema/boolean.html">
            
                <a href="../schema/boolean.html">
            
                    
                    布尔值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../schema/combining.html">
            
                <a href="../schema/combining.html">
            
                    
                    组合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../schema/ref.html">
            
                <a href="../schema/ref.html">
            
                    
                    引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../schema/generic.html">
            
                <a href="../schema/generic.html">
            
                    
                    通用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >paths</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="paths">paths</h1>
<p>&#x63CF;&#x8FF0;&#x4E00;&#x4E2A;&#x63A5;&#x53E3;&#x524D;, &#x6211;&#x4EEC;&#x9996;&#x5148;&#x8981;&#x770B;&#x4E00;&#x4E0B;&#x4E00;&#x4E2A;&#x63A5;&#x53E3;&#x6709;&#x54EA;&#x4E9B;&#x5C5E;&#x6027;</p>
<ul>
<li>&#x8BF7;&#x6C42;<ul>
<li>&#x63A5;&#x53E3;&#x8DEF;&#x5F84;</li>
<li>&#x8BF7;&#x6C42;&#x53C2;&#x6570;</li>
<li>&#x8BF7;&#x6C42;&#x65B9;&#x6CD5;</li>
<li>&#x8BF7;&#x6C42;&#x5934;</li>
<li>&#x8BF7;&#x6C42;&#x4F53;</li>
</ul>
</li>
<li>&#x54CD;&#x5E94;<ul>
<li>&#x54CD;&#x5E94;&#x72B6;&#x6001;&#x7801;</li>
<li>&#x54CD;&#x5E94;&#x5934;</li>
<li>&#x54CD;&#x5E94;&#x4F53;</li>
</ul>
</li>
</ul>
<p>&#x5F53;&#x7136;&#xFF0C; &#x5E76;&#x4E0D;&#x662F;&#x6240;&#x6709;&#x7684;&#x63A5;&#x53E3;&#x90FD;&#x5305;&#x542B;&#x4EE5;&#x4E0A;&#x5B57;&#x6BB5;&#xFF0C;&#x4F46;&#x5176;&#x4E2D;&#x6709;&#x51E0;&#x4E2A;&#x5FC5;&#x4E0D;&#x53EF;&#x5C11;&#x7684;&#x5B57;&#x6BB5;&#xFF0C;&#x5B83;&#x4EEC;&#x5206;&#x522B;&#x662F; <strong>&#x8BF7;&#x6C42;&#x8DEF;&#x5F84;</strong>&#xFF0C;<strong>&#x8BF7;&#x6C42;&#x65B9;&#x6CD5;</strong> &#x548C; <strong>&#x54CD;&#x5E94;&#x7801;</strong></p>
<p>&#x5F53;&#x7136;&#x5728; OpenAPI &#x4E2D;&#x63A5;&#x53E3;&#x7684;&#x6BCF;&#x4E2A;&#x5C5E;&#x6027;&#x90FD;&#x6709;&#x5177;&#x4F53;&#x7684;&#x5B57;&#x6BB5;&#x6765;&#x63CF;&#x8FF0;. &#x63A5;&#x4E0B;&#x6765;&#x9996;&#x5148;&#x6765;&#x770B;&#x4E0B;&#x63A5;&#x53E3;&#x7684;&#x5165;&#x53E3;: &#x63A5;&#x53E3;&#x8DEF;&#x5F84;</p>
<h2 id="&#x63A5;&#x53E3;&#x8DEF;&#x5F84;">&#x63A5;&#x53E3;&#x8DEF;&#x5F84;</h2>
<p><strong>paths &#x4E0B;&#x9762;&#x7684;&#x5B57;&#x6BB5; &#x90FD;&#x662F;&#x63A5;&#x53E3;&#x8DEF;&#x5F84;&#x3002;&#x800C;&#x4E14;&#x53EA;&#x80FD;&#x662F;&#x63A5;&#x53E3;&#x8DEF;&#x5F84;&#xFF0C;&#x5FC5;&#x987B;&#x4EE5; <code>/</code> &#x5F00;&#x5934;</strong></p>
<p>&#x793A;&#x4F8B;</p>
<pre><code class="lang-yaml"><span class="hljs-attr">paths:</span>
  /add:
    <span class="hljs-comment"># &#x8FD9;&#x91CC;&#x63CF;&#x8FF0; add &#x63A5;&#x53E3;</span>
  /del:
    <span class="hljs-comment"># &#x8FD9;&#x91CC;&#x63CF;&#x8FF0; del &#x63A5;&#x53E3;</span>
  /update:
    <span class="hljs-comment"># &#x8FD9;&#x91CC;&#x63CF;&#x8FF0; update &#x63A5;&#x53E3;</span>
</code></pre>
<p><code>paths</code> &#x4E0B;&#x9762;&#x7684;&#x8DEF;&#x5F84;&#x4E5F;&#x53EF;&#x80FD;&#x662F;&#x6A21;&#x677F;&#x8DEF;&#x5F84;, &#x6BD4;&#x5982;</p>
<pre><code class="lang-yaml"><span class="hljs-attr">paths:</span>
    /pet/{petId}:
<span class="hljs-attr">        parameters:</span>
<span class="hljs-attr">            - name:</span> id
<span class="hljs-attr">                in:</span> path
<span class="hljs-attr">                required:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">                schema:</span>
<span class="hljs-attr">                    type:</span> integer
</code></pre>
<p>&#x4E0A;&#x9762;&#x7684;&#x7247;&#x6BB5;&#x5C31;&#x8868;&#x793A;&#x4E86; &#x4E00;&#x4E2A;&#x6A21;&#x677F;&#x8DEF;&#x5F84;, &#x8BE5;&#x8DEF;&#x5F84;&#x7684;&#x683C;&#x5F0F; &#x5C31;&#x662F; <code>/path/</code> + <code>&#x6570;&#x5B57;</code> . &#x53EA;&#x8981;&#x7B26;&#x5408;&#x8BE5;&#x683C;&#x5F0F;&#x7684;&#x8DEF;&#x5F84;, &#x90FD;&#x53EF;&#x4EE5;&#x8BA4;&#x4E3A;&#x662F;&#x6B64;&#x63A5;&#x53E3;.</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="info.html" class="navigation navigation-prev " aria-label="Previous page: info">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="url.html" class="navigation navigation-next " aria-label="Next page: /add, /del, ...">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"paths","level":"1.1.3","depth":2,"next":{"title":"/add, /del, ...","level":"1.1.3.1","depth":3,"path":"openapi/url.md","ref":"openapi/url.md","articles":[{"title":"get, post, ...","level":"1.1.3.1.1","depth":4,"path":"openapi/method.md","ref":"openapi/method.md","articles":[{"title":"parameters","level":"1.1.3.1.1.1","depth":5,"path":"openapi/parameters.md","ref":"openapi/parameters.md","articles":[]},{"title":"requestBody","level":"1.1.3.1.1.2","depth":5,"path":"openapi/requestBody.md","ref":"openapi/requestBody.md","articles":[]},{"title":"responses","level":"1.1.3.1.1.3","depth":5,"path":"openapi/responses.md","ref":"openapi/responses.md","articles":[{"title":"200, 400, ...","level":"1.1.3.1.1.3.1","depth":6,"path":"openapi/response_code.md","ref":"openapi/response_code.md","articles":[{"title":"content","level":"1.1.3.1.1.3.1.1","depth":7,"path":"openapi/content.md","ref":"openapi/content.md","articles":[{"title":"text/plain","level":"1.1.3.1.1.3.1.1.1","depth":8,"path":"openapi/media.md","ref":"openapi/media.md","articles":[{"title":"schema","level":"1.1.3.1.1.3.1.1.1.1","depth":9,"path":"openapi/schema.md","ref":"openapi/schema.md","articles":[]}]}]}]}]}]}]},"previous":{"title":"info","level":"1.1.2","depth":2,"path":"openapi/info.md","ref":"openapi/info.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"openapi/paths.md","mtime":"2020-08-17T06:07:42.072Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-08-17T10:32:10.207Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

